Locate 16,3 : Print "1> Close Workbench and Amos Editor ( left mouse ) "
Locate 16,4 : Print "2> Carry on as normal ( right mouse ) "
Locate 16,5 : Print "3> Continue ( Space Bar ) "
Pen 2
Repeat
A$=Inkey$ : If Mouse Key=1 Then Locate 34,6 : Print " Close All " : C=1
If Mouse Key=2 Then Locate 34,6 : Print "Keep Them Open " : C=2
Until A$=" "
If C=1 Then Screen Close 0 : Close Editor : Close Workbench
If C=2 Then Screen Close 0 : Pop Proc
End Proc
Close : Rem needed only when run from the editor...(* to handle ^c breaks on open files... *)
BEGIN:
_SCREEN
Procedure _SCREEN
Unpack 7 To 1 : Double Buffer : Autoback 0
Wait Vbl : Screen Open 0,320,256,32,0 : Curs Off : Cls 0 : Paper 0 : Double Buffer : Autoback 0 : Palette $0,$33 : Screen Hide 0
Flash Off : Bob Update Off : Sprite Update Off : Update Off
Screen Copy Logic To Physic : Update Off
Screen Open 2,640,15,2,Hires+Laced : Palette $1,$FFF : Ink 1 : Cls 0 : Paper 0 : Screen Display 2,,50,Screen Width,Screen Height-5 : Curs Off : Cls 0 : Text 2,7," Anim To Bob Grabber V1.0 by Scally 1996"
Screen 1 : Ink 18
End Proc
Procedure CMAP
' The Blue hue on the main screen...
For N=1 To 31
C=N+(N*N)+N
Colour N,C
Next N
Palette $0,$33
End Proc
Global F$,F,NUM,FRAMES,GX1,GX2,GY1,GY2,FILE,BANK_DONE,SF
If Mouse Zone Then MZ=Mouse Zone : MESSAGE[MZ,BF,SF,G]
If Mouse Zone=2 and Mouse Key=1 Then Erase 5 : _OPEN[SF] : Screen 1 : Screen Hide 0
If Mouse Zone=3 and Mouse Key=2 Then Bob Off : Bob Update : Erase 1 : GONE=1
If Mouse Zone=3 and Mouse Key=1 and FILE=1 Then GONE=0 : Screen 0 : Screen Hide 1 : _LOAD_GRAB[G,SF,BF] : Screen 1 : Screen Hide 0
If Mouse Zone=4 and Mouse Key=1 and GONE=0 Then Gosub TESTER
If Mouse Zone=5 and Mouse Key=1 and BANK_DONE=1 Then SAVIT
If Mouse Zone=6 and Mouse Key=1 Then Dec G : Wait 1 : Text 27,170," " : G$=Str$(G) : Text 29,170,G$ : Screen Copy Logic To Physic : If G<=1 Then G=1 : G$=Str$(G) : Text 29,170,G$ : Screen Copy Logic To Physic
If Mouse Zone=7 and Mouse Key=1 Then Inc G : Wait 1 : Text 27,170," " : G$=Str$(G) : Text 29,170,G$ : Screen Copy Logic To Physic
If Mouse Zone=8 and Mouse Key=2 and BF<=SF-1 Then Dec SF : Wait 1 : Text 47,116," " : SF$=Str$(SF) : Text 51,116,SF$ : Screen Copy Logic To Physic : If SF<=1 Then SF=1 : SF$=Str$(SF) : Text 54,116,SF$ : Screen Copy Logic To Physic
If Mouse Zone=9 and Mouse Key=2 and BF<=SF-1 Then Inc SF : Wait 1 : Text 47,116," " : SF$=Str$(SF) : Text 51,116,SF$ : Screen Copy Logic To Physic
If Mouse Zone=8 and Mouse Key=1 and BF<SF-1 Then Dec BF : Wait 1 : Text 14,116," " : BF$=Str$(BF) : Text 14,116,BF$ : Screen Copy Logic To Physic : If BF<2 Then BF=1 : G$=Str$(BF) : Text 14,116,BF$ : Screen Copy Logic To Physic
If Mouse Zone=9 and Mouse Key=1 and BF<SF-1 Then Inc BF : Wait 1 : Text 14,116," " : BF$=Str$(BF) : Text 14,116,BF$ : Screen Copy Logic To Physic
If Mouse Zone=10 and Mouse Key=1 Then _LOAD_BANK
If Mouse Key Then Paper 0 : Pen 15 : Locate 1,30 : Print F/1000;"k ","Chip";Chip Free/1000;"k " : Locate 19,30 : Print "Total";(Chip Free+Fast Free)/1000;"k" : Screen Copy Logic To Physic
TIME$[CFLAG] : Text 255,248,Param$ : Rem You don't need this but I hate flipping to see the time etc...
Bob 1,1,1,G : Wait Vbl : Bob Update
If BF=SF Then SF=SF+2
Until Mouse Zone=1 and Mouse Key
'N=Execall(-138) : Rem Permit()... Switch On Multi-Tasking ! ALWAYS call this after Exec call'
Fade 4 : Wait 50 : Screen Close 2 : Edit
' ************ File Stuff **********
Procedure SAVIT
F$=Fsel$("","","Save Bob Bank As")
If F$<>"" Then
Save F$,1
End Proc
Procedure _LOAD_BANK
F$=Fsel$("*.abk","","Load a Bob Bank")
If F$<>""
F2$=Right$(F$,3)
If F2$="abk"
Erase 1
Load F$
A$="" : A=0 : Repeat : A$=A$+Chr$(Peek(Start(1)-8+A)) : Inc A : Until A=8
If A$<>"Sprites "
F$=""
End If
End If
End If
End Proc
' *********** Bob Viewing **********
TESTER:
Bob Off : Wait Vbl : Bob Update : Wait Vbl : Screen To Back 1 : Wait Vbl : Screen Show 0 : Wait Vbl : Screen 0
Screen 0 : Cls 0
If Length(1)>1 Then Get Bob Palette
Repeat
DWN[60,60,SF,G]
Until Mouse Key
Bob Off : Wait Vbl : Bob Update
Screen To Back 0 : Wait Vbl : Screen To Front 1 : Screen To Front 2
Screen 1
CMAP
Return
Procedure DWN[X,Y,SF,G]
For N=G To SF
Wait Vbl : Bob 1,X,Y,N : Wait Vbl : Bob Update
Next N
End Proc
'***********************************
Procedure MESSAGE[Z,BF,SF,G]
Screen 2 : Cls 0
G$=Str$(G) : BF$=Str$(BF) : SF$=Str$(SF)
If Z=2 Then S$=" Load an IFF Anim sequence. Starting from"+BF$+" To "+SF$
If Z=3 Then S$=" Grab Bobs From Anim sequence. Starting at Bob Number"+G$+" Ending"+SF$
If Z=4 Then S$=" View Bobs "+G$+" To "+SF$+" Hold down LEFT MOUSE button to exit"
If Z=5 Then S$=" Save Bob bank to disc"
If Z=6 Then S$=" Decrease Bob image number... Bob currently set at "+G$
If Z=7 Then S$=" Increase Bob image number... Bob currently set at "+G$
If Z=8 Then S$=" Decrease Start/End of Anim using LEFT/RIGHT MOUSE BUTTON "+BF$+SF$
If Z=9 Then S$=" Increase Start/End of Anim using LEFT/RIGHT MOUSE BUTTON "+BF$+SF$
If Z=10 Then S$=" Load a Bob Bank"
If Z=1 Then S$="Quit -No Banks Are Erased-"
Text 30,7,S$
Repeat
Until Mouse Key
Screen 1
End Proc
Procedure TIME$[CFLAG]
If CFLAG=1 Then TIME$="-- -- --" : Goto FIN
T$=Space$(12)
Dreg(1)=Varptr(T$)
RIEN=Doscall(-192)
MN=Leek(Varptr(T$)+4)
SEC=Leek(Varptr(T$)+8)
H=MN/60 : H$=Mid$(Str$(H),2) : If Len(H$)<2 : H$="0"+H$ : End If
M=MN mod 60 : M$=Mid$(Str$(M),2) : If Len(M$)<2 : M$="0"+M$ : End If
S=SEC/50 : S$=Mid$(Str$(S),2) : If Len(S$)<2 : S$="0"+S$ : End If